package com.cloudree.gllib;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.cloudree.gllib.activity.CubeActivity;
import com.cloudree.gllib.activity.CylinderActivity;
import com.cloudree.gllib.activity.HockeyActivity;
import com.cloudree.gllib.activity.LineActivity;
import com.cloudree.gllib.activity.TextureActivity;
import com.cloudree.gllib.activity.TriangleActivity;
import com.kvin.toolkit.utils.JumpUtils;

import butterknife.BindView;
import butterknife.ButterKnife;

public class MainActivity extends BaseActivity {
    @BindView(R.id.triangle_btn)
    Button triangleBtn;
    @BindView(R.id.cube_btn)
    Button cubeBtn;
    @BindView(R.id.line_btn)
    Button lineBtn;
    @BindView(R.id.hoc_btn)
    Button hocBtn;
    @BindView(R.id.cylinder_btn)
    Button cylinderBtn;
    @BindView(R.id.texture_btn)
    Button textureBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.bind(this);
    }

    @Override
    public void init() {
        setTitle("Menu");
        this.triangleBtn.setOnClickListener(this);
        this.cubeBtn.setOnClickListener(this);
        this.lineBtn.setOnClickListener(this);
        this.hocBtn.setOnClickListener(this);
        this.cylinderBtn.setOnClickListener(this);
        this.textureBtn.setOnClickListener(this);
    }


    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.triangle_btn:
                JumpUtils.simpleJump(getActivity(), TriangleActivity.class);
                break;
            case R.id.cube_btn:
                JumpUtils.simpleJump(getActivity(), CubeActivity.class);
                break;
            case R.id.line_btn:
                JumpUtils.simpleJump(getActivity(), LineActivity.class);
                break;
            case R.id.cylinder_btn:
                JumpUtils.simpleJump(getActivity(), CylinderActivity.class);
                break;
            case R.id.hoc_btn:
                JumpUtils.simpleJump(getActivity(), HockeyActivity.class);
                break;
            case R.id.texture_btn:
                JumpUtils.simpleJump(getActivity(), TextureActivity.class);
                break;
        }
    }

}
